home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
351-375
/
367
/
scm
/
scm&l.doc
< prev
next >
Wrap
Text File
|
1995-03-14
|
10KB
|
249 lines
Screen Color Modifier
SCREEN COLOR MODIFIER
by Jean-Marc NOGIER
(release 1.0)
(First, I'd like to apologize for my poor english.)
This utility is public domain freeware. Everybody that could find
an interest in this program can copy it and use it freely.
SCM stands for "Screen Color Modifier". It allows you to change
the colors of any (didn't check fully for HAM screen, and can't
check for halfbrite screen) opened screen under Intuition.
I created it to be able to change the colors of program that do
not support user color modification (e.g. Sculpt3D).
Then the modified colors can be saved to disk to be used later.
SCL stands for "Screen color Loader". It allows you to load some
colors to a specified screen from a file saved under SCM.
SCL is smaller and uses less memory than SCM. I keep it
separated from SCM for these reasons, and also because I was not
able to use overlays under AmigaDOS.
SCL waits for the specified screen to be opened, then changes
its colors, and exits.
The procedure to use SCM and SCL is:
- load the application the screen colors have to be modified,
- load SCM from the CLI or the WorkBench,
- modify the colors under SCM,
- save color modifications to a file.
At a later use:
- load SCL from the CLI specifying the screen,
- load the application,
- look at the screen colors being modified.
SCM and SCL were written on a NTSC Amiga 1000, using the
Lattice C compiler (release 5.04), and PowerWindows (release 2.5).
I didn't check the PD libraries to see if a similar program is
already available (excepted the Palette program on the Workbench
disk), but anyway if there is enough people interested in SCM &
SCL, I may update them later.
I know the code size is too big (I'm not a professional), that I
did not check all possibilities (but my time is limited). So if you
discover a bug and would like it to be fixed, you can mail me a
letter at the following address, I'll try to find some time to
answer you.
address: Jean-Marc NOGIER in FRANCE: BAL JMN on Sgt FLAM
30 Bd. de La Paix (1 39 55 84 59)
92400 COURBEVOIE
FRANCE
JMN page 1 20-Apr-90 Screen Color Modifier
SCM description
To run SCM click on its icon, or type "SCM" at the CLI prompt.
A new screen which name is "Screen Color Modifier" is being
displayed at the bottom of the current screen (usually the
Workbench screen). It is lo-res and features a title bar to drag
it and 2 depth arrangement gadgets. The window opened in this
screen is called "Screen Color Modifier" (well that's free
advertisement space) and features 2 to 32 color gadgets on the
left, the color currently selected, 3 RGB sliders to modify the
selected color, a gadget called "OK" to save your changes, a gadget
called "NO" to undo your modifications, and 2 arrows to allow you
to find the screen the colors of which you want to modify.
First, click once on the down arrow to display the next screen
name. If no other screen than the Workbench is opened, then you
should see SCM screen name. Otherwise the next screen name in
Intuition list is displayed in the string gadget. You can click on
the down arrow until you reach the last screen.
Now click on the upper arrow to display the previous screen
name and continue until you reach the first screen name.
Since screens are linked by Intuition if you change screen display
order when using SCM, you may have to search forward, then
backward until you find that screen name. Notice that clicking on
the arrow gadget display the screen name, but doesn't display the
screen. You need to find the screen using depth arrangement
gadgets if you want to look at the modifications you've made.
Click on the gadget colors (from 2 to 32 gadgets) to select the
color you want to modify. The color selected appears in the large
rectangle between the color gadget and the RGB sliders.
Notice that when you select another screen the number of color
gadgets is adjusted to the screen depth.
Modify the selected color using the RGB sliders as you would do
in Preferences. The amount of red, green and blue are displayed
right to the corresponding sliders (from 0 to 15).
The changes you've just made may be canceled by clicking on the
NO gadget.
Otherwise you can save to a file the modification you've made by
clicking on the OK gadget. A file requester opens and you must
select a drawer and a file name, by typing the names in the
corresponding string gadgets. As an alternative you can select the
drawer by clicking on one of the 5 gadgets on the right of the
requester. When the drawer is selected, the file names of that
drawer are displayed sorted by alphabetical order, followed by the
sub-directories of that drawer if any. Files and sub-directories
can be selected by clicking on their respective names. If you want
to go backward in the directory tree click on the "/" gadget.
Modifications are saved under the specified file name when you
click on the OK gadget of the file requester. You can cancel
anytime by pressing the Cancel gadget.
JMN page 2 20-Apr-90 Screen Color Modifier
Click on the windowclose gadget to quit SCM.
There is also a menu featuring 4 items:
- Load: allows you to replace the colors of the currently
selected screen with the colors contained in a file previously saved
under SCM.
If the number of colors in the file is less than the number of
colors of the current screen, only the first colors of the
current screen are replaced.
- Save: save your modifications to a file under the latest
specified file name.
- Save as: same action as clicking on the OK gadget.
- Quit: same action as clicking on the windowclose gadget.
Note: do not try to modify the colors of a screen under SCM
after this screen has been closed, or you may crash the system.
This is because SCM doesn't know about closed screen until you
select a new screen with the gadget arrows.
JMN page 3 20-Apr-90 Screen Color Modifier
SCL description
To run SCL type at the CLI prompt:
SCL -c<file name> [-t<timeout>] [-p<period>]
The filename is mandatory. it can be created using the save
option of SCM.
The timeout is by default quite a long time (more than 68
years should be above Amiga MTBF), but can be changed to a value
you specify in seconds.
The period (by default 5 seconds) is the interval of time
between 2 screen checking. Specify it in seconds.
SCL tries to change the color of the screen whose name
appears in the file name specified in the command line. If the
screen is not yet opened, SCL waits for it to open, changes its
colors, and then exits. The new colors are read from a file which
can be created using the screen color modifier utility (SCM).
If the screen is not opened, SCL goes to sleep for a period
of time you can specify with the -p option. It defaults to 5
seconds. After this period of time, SCL checks again if the screen
is opened and so on.
The time SCL wait for the screen to be opened can be
specified with the -t option.
An example to use it (replace Sculpt3D with your choice):
- load Sculpt3D,
- load SCM,
- find Sculpt3D screen,
- modify the colors as you like,
- save the modification to a file named: "dh0:Sculpt.scm",
- create a batch file called Sculpt3D_my_colors, with 2 lines:
- Run SCL -cdh0:Sculpt.scm
- Run Sculpt3D
- type Execute Sculpt3D_my_colors,
- watch the colors of the Sculpt3D screen being changed.
JMN page 4 20-Apr-90